package edu.bbu.commonproject.desktop.gui.view.swing.file;

import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Graphics;
import java.awt.Image;

import javax.swing.ImageIcon;
import javax.swing.JButton;

import edu.bbu.commonproject.desktop.gui.view.swing.utils.Design;
import edu.bbu.commonproject.desktop.gui.view.swing.utils.HeaderButton;
import edu.bbu.commonproject.desktop.gui.view.swing.utils.TexturedPanel;
import edu.bbu.commonproject.desktop.gui.view.swing.utils.TransparentButton;

/**
 * The logo file list panel.
 */
public class LogoFileListPanel extends TexturedPanel
{
	/** The logo image. */
	private Image logoImage;
	
	/** The logo texture. */
	private Image logoTexture;
	
	/** The synchronize button icon. */
	private ImageIcon synchronizeButtonIcon;
	
	/** The stup button icon. */
	private ImageIcon setupButtonIcon;
	
	/** The logout buttom icon. */
	private ImageIcon logoutButtonIcon;
	
	/** The help button icon. */
	private ImageIcon helpButtonIcon;
	
	/** The synchronize butto.n */
	private HeaderButton synchronizeButton;
	
	/** The setup buttom. */
	private HeaderButton setupButton;
	
	/** The logout button. */
	private HeaderButton logoutButton;
	
	/** The help button. */
	private HeaderButton helpButton;
	

	/**
	 * The constructor.
	 */
	public LogoFileListPanel()
	{
		logoImage = Design.COMPONENT_LOGO;
		logoTexture = Design.COMPONENT_HEADEREXTURE;
		synchronizeButtonIcon = new ImageIcon(Design.HEADER_BUTTON_SYNC);
		setupButtonIcon = new ImageIcon(Design.HEADER_BUTTON_SETUP);
		logoutButtonIcon = new ImageIcon(Design.HEADER_BUTTON_LOGOUT);
		helpButtonIcon = new ImageIcon(Design.HEADER_BUTTON_HELP);
		
		this.setTexture(logoTexture);
		this.setPreferredSize(new Dimension(900, 80));
		this.setLayout(new FlowLayout(FlowLayout.RIGHT, 2, 0));
		
		setComponents();
	}
	
	/**
	 * Sets up the components.
	 */
	private void setComponents()
	{		
		logoutButton = new HeaderButton();
		logoutButton.setIcon(logoutButtonIcon);
		
		synchronizeButton = new HeaderButton();
		synchronizeButton.setIcon(synchronizeButtonIcon);
		
		setupButton = new HeaderButton();
		setupButton.setIcon(setupButtonIcon);
		
		helpButton = new HeaderButton();
		helpButton.setIcon(helpButtonIcon);

		this.add(logoutButton);
		this.add(synchronizeButton);
		this.add(setupButton);
		this.add(helpButton);
	}
	
	/**
	 * The paint component method.
	 */
	public void paintComponent(Graphics g)
	{
		super.paintComponent(g);
		g.drawImage(logoImage, 0, 0, null);
	}
	
	/**
	 * Gets the synchronize buttom.
	 * @return the synchronize buttom.
	 */
	public HeaderButton getSynchronizeButton()
	{
		return synchronizeButton;
	}
	
	/**
	 * Gets the logout buttom.
	 * @return the logout buttom.
	 */
	public HeaderButton getLogoutButton()
	{
		return logoutButton;
	}
	
	/**
	 * Gets the setup buttom.
	 * @return the setup buttom.
	 */
	public HeaderButton getSetupButton()
	{
		return setupButton;
	}
	
	/**
	 * Gets the help button. 
	 * @return the help button. 
	 */
	public HeaderButton getHelpButton()
	{
		return helpButton;
	}
	
}
